/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-04-27
 * Time: 23:21
 */
public class Main {
    public static void add(int x, double y) {
        System.out.println(x + y);
    }
    public static void add(int x, int z , double y) {
        System.out.println(x + y + z);
    }

    public static void main(String[] args) {
        add(2, 4.5);
        add(2, 4, 3.4);
    }
    /**
     * 改变形参，实参不会改变，因为属于不同的函数栈帧，所以形成是实参的一份临时拷贝
     * @param a
     */
    public static void func(int a) {//这里a是形参
        a = 11;
    }
    public static void main0(String[] args) {
        int a = 10;
        System.out.println(a);//这里a是实参
    }
    public static boolean isLeapYear(int year) {
        if ((0 == year % 4 && 0 == year % 400) || 0 == year % 400) {
            return true;
        }else {
            return false;
        }
    }

    public static void main1(String[] args) {
        boolean ret = isLeapYear(2009);
        if (ret == true) {
            System.out.println("是闰年");
        }else {
            System.out.println("不是闰年");
        }

    }
}
